1. Field of the Invention
The present invention relates to a controller having a PID selection function capable of performing stable PID control during a change of a PID value.
2. Description of the Related Art
FIG. 6 is a block diagram showing a configuration of a conventional controller having a PID selection function. In the diagram, reference number 100 designates a controller having a PID selection function, 200 denotes an object device or system to be controlled, 101 indicates a PID set selection means for selecting a set of a P (Proportional) value, an I (Integral) value, and a D (Derivative) value. Reference number 102 designates a PID value storage means for storing P, I, and D values, 103 denotes a PID value input means through which P values, I values, and D values are inputted. Reference number 104 designates a PID value determination means for determining a set of the P, I, and D values, 105 denotes PID calculation means for calculating an operation value MV based on the P, I, and D values transferred from the PID value determination means 103 and a deviation value (measured value PVxe2x88x92set value SP), and outputting the operation value MV to the object device 200 in order to perform the PID control for the object device 200. Reference number 106 indicates a set value input means for inputting and outputting a set value, and 107 denotes a subtracter for subtracting a set value SP from a measured value PV as an actual process variable.
Next, a description will be given of the operation of the conventional controller having the PID selection function.
In this controller, the PID calculation means 105 performs the PID calculation based on the deviation value (PVxe2x88x92SP) so that the measured value PV of the object device becomes equal to the set value SP, and then calculates the operation value MV. For example, the controller supplies the current corresponding to the operation value MV to a heater (not shown) equipped in the object device 200 so that the temperature of a high-temperature tank measured becomes equal to the desired set temperature.
Generally, in cases where the object device 200 includes different works to be controlled and where different set values SP are used, because the object device 200 is in different environment, it is necessary to use different PID values. That is, it is necessary to change the PID value every changing of the work and the set value SP. In such a conventional controller, the PID value determination means 104 reads the PID value stored in the PID value storage means 102 corresponding to the set number selected by the PID set selection means 101, and outputs the read one to the PID calculation means 105. The PID value storage means 102 stores the PID values in advance, each of which corresponds to its PID set number.
Through the PID value input means 103 incorporated in the controller, the PID values stored in the PID value storage means 102 corresponding to the PID numbers are stored in advance.
The PID set selection means 101 determines the PID set number based on the input through an external input switch or the PID set selection means placed in the controller. For example, the PID set selection means 101 so determines that the PID set number is the value xe2x80x9c1xe2x80x9d when the external input switch is ON, and determines that the PID set number is the value xe2x80x9c2xe2x80x9d when OFF.
FIG. 7 is a flow chart showing the operation of the PID value determination process in the conventional controller when the PID value is changed.
First, the PID set selection means 101 reads a set number (Step ST100). It is judged whether the set number read is xe2x80x9c1xe2x80x9d or xe2x80x9c2xe2x80x9d (Step ST101). When the set number is xe2x80x9c1xe2x80x9d, the PID value storage means 102 reads the PID value corresponding to the set number xe2x80x9c1xe2x80x9d (Step ST102). On the contrary, the judgment result in the Step ST101 indicates the set number is xe2x80x9c2xe2x80x9d, the PID value corresponding to the set number xe2x80x9c2xe2x80x9d is read from the PID value storage means 102 (Step ST103). The PID value read in Step ST102 or ST103 is outputted to the PID calculation means 105. When receiving the PID value, the PID calculation means 105 calculates new operation value MV (Step ST104), and then outputs the calculated one to the object device 200.
Because the conventional controller having the PID selection function has the configuration described above, the PID value to be supplied to the PID calculation means 105 is rapidly changed in the changing process of the PID value. This causes that a new operation value MV from the PID calculation means 105 is rapidly changed, so that it is difficult to perform the correct control for the object device in the changing process of the PID value.
The present invention has been made to solve the drawback involved in the conventional controller having the PID selection function. It is therefore an object of the present invention to provide a controller having a PID selection function capable of suppressing the rapid change of the operation value to be supplied to an object device or system when the PID value is changed and capable of controlling the object device or system smoothly and continuously.
According to an aspect of the present invention, there is provided a controller having a PID selection function of performing PID calculation so that a measured value of an object device or system to be controlled is reached to a set value and of calculating an operation value to be supplied to the object device or system based on the PID value calculated. The controller of the present invention has a PID set selection means and a PID value determination means. The PID set selection means selects a set number of the PID value. The PID value determination means performs PID calculation in order to determine a PID value based on a current PID value of the set number currently selected by the PID set selection means, a previous PID value of the set number previously selected by the PID set selection means, and a switch time to switch the previous PID value to the current PID value.
Further, according to another aspect of the present invention, the PID value determination means in the controller determines the PID value based on fuzzy inference using a switch time as a parameter, the PID value corresponding to the PID set number currently selected, and the PID value of the set number previously selected.
Still further, according to another aspect of the present invention, the PID value determination means in the controller calculates the switch time based on a D value as a derivative time of the PID value corresponding to the set number selected by the PID set selection means.